package org.whuims.pois.action.result;

import org.apache.struts.action.ActionForm;
import org.whuims.pois.model.View;

import java.util.ArrayList;
import java.util.List;

/**
 * 观点分组结果
 * 
 * @author lsw
 * 
 */
public class ViewResult extends ActionForm {
	private String groupType = "";// 组类别：person,newstitle,newssite
	private String groupName = ""; // 组名
	private int count = 0; // 包含观点数量
	private List<View> viewList = new ArrayList<View>(); // 观点列表

	public String getGroupType() {
		return groupType;
	}

	public void setGroupType(String groupType) {
		this.groupType = groupType;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public int getCount() {
		return count;
	}

	public List<View> getViewList() {
		return viewList;
	}

	public void addView(View v) {
		this.count++;
		viewList.add(v);
	}

	public void setCount(int count) {
		this.count = count;
	}

	public void setViewList(List<View> viewList) {
		this.viewList = viewList;
	}

	public void addViewList(List<View> vs) {
		for (int i = 0; i < vs.size(); i++) {
			this.count++;
			addView(vs.get(i));
		}
	}
}
